//引入path路径模块

const path = require('path')

//使用path的join方法
// const pathStr = path.join('/a', '/b/c', '../', './d', 'e')

const pathStr = path.join(__dirname, './files/test.txt')

console.log(pathStr)

console.log(__dirname + './files/test.txt')

//使用path的basename方法

// const basename = path.basename('./files/a/a/a/b/c/test.txt')

// console.log(basename)

//使用path的extname方法

// const extname = path.extname('./files/a/a/a/b/c/test.html')

// console.log(extname)
